Snippets is a way to get at small snippets of code, or any other data, using module and category organization and quick access methods. You can create your own modules, trade modules that someone else has done, and modify modules from IT Makers.
Snippets display window.
The 3 boxes on the left have the following functions:
a) The top box is the current module being displayed. Clicking on this box will switch you to the next module.
b) The middle box is the category currently being shown. Clicking on this box, if displaying a snippet in that category, will return you to the category display.
c) The bottom box displays the name of the current Snippet.
Forward/Back. These buttons are used together. As you go exploring through the module you are defining a search path. Snippets keeps track of the path you are taking. When you want to back up along the path you have taken, retrace your steps, then pressing the Back button will take you back. If you want to continue on that path then pressing the Forward button will take you back through the path you have already made, until it reaches the point where you started.
Clip. This button will copy the current snippet onto the clipboard. This does the same thing as the menu Copy command in the Edit menu.
Snippets. To get a display, in alphabetic order, of all the snippets in the current module then press this button.
Categorys. To display all the main categories in the current module then press this button.
Edit Category. Creating, editing, and deleting categories are accessed by using this button. This brings up a dialog that allows for changing categories.
Edit Snippet. If a snippet is currently being displayed then this allows you to change it. If no snippet is being displayed, for example the categories are being displayed, then this brings up the dialog to create a new snippet.
Find. The Find text entry is used to quickly locate a selection in the current window. It does not yet search all the entries for a string.
Snippets display.
Pressing the "Snippets" button will show a list of all the snippets in the current module. This is a list that is in alphabetic order. Use the 'Find' text entry to quickly locate the snippet wanted.
The name of the Snippet along the left edge, in bold type. The title for the snippet, a short description, is displayed to the right of the name.
It is possible to have snippets with the same name, if they were created that way.
For example, the Decoder Ring program (for the AppleScript package) creates modules based on the 'aete' resource in an application. Since it is up to the program author to add comments about each item in the 'aete' resource, it is quite possible that they neglected to do the extra work and just gave a generic description for entries like 'Best type'. In this case, you will have numerous entries with the same name but all coming from different program object descriptions.
Category display.
Pressing the "Categorys" button will show a list of all the main categories in the current module. This is a list that is in alphabetic order. Use the 'Find' text entry to quickly locate the category wanted.
Entering a 'S' in the Find text entry area quickly automatically selects the first item that it matches, in this case the first category starting with an 'S'. If you press the Return key at this time then the currently selected category, 'Sound', will be chosen.
Entering the next character, in this case a 'u', quickly automatically moves the selection to the entry that matches it. In this case the selection has moved over from 'Sound' to 'Subroutines'. Pressing the Return key at this would select the 'Subroutines" category.
Category list.
The category, 'Application' shows all the snippets in this category. The snippets that are not assigned to a subcategory are show first in alphabetical order. Next come the subcategories and the snippets in each one of them.
As seen in this category, 'Control', there are three subcategories visible. More are in this category as shown by the scrollbar not being dimmed out.
If you are getting too many subcategorys, then consider changing some of them into categories. If you are using a certain subcategory a lot and are adding more snippets to it causing it to grow larger, then consider making it into its own category.
Defining categories.
To add in a new category:
Enter the name in the "Category name" area.
Press the "Add category" button.
To add a new subcategory:
Select the category to add it to from the list on the left. This will automatically place the category name in the "Category name" text entry area.
Enter the name in the "Subcategory name" area.
Press the "Add subcategory" button.
To change the name of a category:
Select the category to change from the list on the left. This will automatically place the category name in the "Category name" text entry area.
Change the name in the "Category name" area.
Press the "Change" button next to the "Add category" button.
To change the name of a subcategory:
Select the subcategory to change from the list on the left. This will automatically place the category name in the "Category name" text entry area. It will automatically place the subcategory name in the "Subcategory name" text entry area.
Change the name in the "Subcategory name" area.
Press the "Change" button next to the "Add subcategory" button.
To delete a category:
Select the category to change from the list on the left. This will automatically place the category name in the "Category name" text entry area.
Press the "Delete" button.
To delete a subcategory:
Select the subcategory to change from the list on the left. This will automatically place the category name in the "Category name" text entry area. It will automatically place the subcategory name in the "Subcategory name" text entry area.
Press the "Delete" button.
Defining Snippets.
Pressing the "Edit Snippet" button when not currently displaying a specific snippet will bring up the dialog with default information in it. Enter the description of your new snippet and then press the "Add" button.
If you were displaying a specific snippet at the time of pressing the "Edit snippet" button, then that will bring up the dialog with the current snippet's information in the dialog. You can then change it and press "Change" to change that snippet. If you instead press the 'Add' button, then a new snippet will be made with this snippet information.
The "Category" list is where you assign the snippet to a specific category or a subcategory inside of a category. "Linkages" assigns relevant snippets.
This snippet display shows a snippet that has relevant snippets, shown as the bold snippet names at the top of the snippet display window. Pressing on any of these will instantly take you to that relevant snippet.
The middle section in this snippet is the description.
The lower section is the actual snippet itself. This is the portion that will be sent to the clipboard when the "Clip" button is pressed or the "Copy" menu item in the "Edit" menu is selected.
Module naming.
The default name given to a new module is the same name as the file saved. To change the name that will be assigned for that module, not the file name, you can change it here.
Select the module that you want to change the name of from the list on the left. Change the name in the text entry area and press the "OK" button. The module now has a new name.
Preferences.
Preferences can be setup for your Snippets display.
The first selection is whether the main category list or the complete snippet list is shown when the Snippets program is started up.
The "Display" preferences allow you to specify the font, size, and style to be used when displaying a snippet.
Select the "Description Text" button. Now set the font, size, and style to use. This is the text shown in the top portion of the snippet display.
Select the "Snippet Text" button. Now set the font, size, and style to use. This is the text shown in the bottom portion of the snippet display.
Attached scripts.
You can create AppleScript scripts in Snippets. You can edit them, and activate them from a menu selection.
Creating a new script causes this dialog to be displayed so you can enter your script. The "Check Syntax" button will assure that it is a valid script. The "Run" button will execute the script.
After creating a new script and pressing the "OK" button you will be asked to give that script a name. This name will be shown in the scripts menu.
If you select the "Edit script" menu item then a dialog where you select the script will come up. It will look like this:
After selecting a script and pressing the "Edit" button you will be shown the same type of display as for creating a new script.
If you select the "Delete script" menu item then a dialog where you select the script will come up.
Pressing the "Delete" button will delete that script from the menu list. This can not be undone, the script will be gone.
Menus.
File menu.
New Module. Use this item to create a new module.
Load Module. Select a module that did not come up in the standard selection. If a new module does not come up in the module list then it is not in the same folder as the Snippets program.
Import. This selection has two options. It can bring in text snippet definitions. The options are either to bring it into the current category or to allow the text to determine the category.
Save. Save any changes to the current module. An auto-save is done whenever you press the "Add" or "Change" buttons in the Snippets editor dialog.
Save as... This selection will save the current module under a new name. If a lot of editing has been done to a module then this option could reduce the disk space used by that module.
Export. Export allows you to export a snippet, a category, or a complete module into a text file.
Print One. This will print only the currently selected snippet.
Print. This will print the current module.
Edit menu.
Cut and Copy will copy the current snippet onto the clipboard.
Module menu.
You can select which module to show here or press on the module name in the Snippets window to change the module to the next one in the list.
Customize menu.
These items allow you to the same kind of access as the buttons in the Snippets window.
Scripts menu.
This is the menu for doing AppleScript editing and executing of scripts.
Ordering:
Snippets is currently available with the AppleScript package. This package includes the program, Decoder Ring. This program creates Snippets Modules automatically for any program that support AppleScript.
Price for Snippets and the AppleScript Package is $59.00